package com.qpx.jiche.auth.web;


import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.baomidou.mybatisplus.mapper.Wrapper;
import com.qpx.jiche.auth.service.ITUserService;
import com.qpx.jxc.common.vo.ResultEntity;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RestController;

import java.security.Principal;
import java.util.List;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author Mht
 * @since 2020-10-15
 */
@RestController
@RequestMapping("/admin/tUser")
public class TUserController {

    @Autowired
    ITUserService userService;


    @RequestMapping("/test")
    public ResultEntity test(){
        Wrapper wrapper = new EntityWrapper();
        List list = userService.selectList(wrapper);
        return ResultEntity.ok(list);
    }


    @GetMapping("/user/info")
    public Principal user(Principal member) {
        return member;
    }



}
